import {http} from "../utils/request";

interface IResData {
    code: string
    message: string
    data: {
      token: string
      adminname: string
    }
  }
function userlogin<IResData>(adminname:string,password:string){
  return http({
    method:'post',
    url:'/admin/admin/login',
    data: { adminname, password },
  })
}
function userZhuce<IResData>(adminname:string,password:string,role:string,checkedKeys:string){
    return http({
        method:'post',
      url:'/admin/admin/add',
      data: { adminname, password,role,checkedKeys },
    })
  }
export {userlogin,userZhuce}